<template>
  <div class="BaseSearchBar">
    <el-card body-style="padding:0px">
      <el-row type="flex"
              justify="flex-start">
        <!-- 标题 -->
        <el-col :span="2"
                type="flex1">
          <div class="search-title">条件搜索栏</div>
        </el-col>
        <!-- 搜索关键字 -->
        <el-col :span="5">
          <BaseSearchBarItem>
            <div slot="lable"
                 class="key">搜索关键字:</div>
            <div slot="input">
              <el-input v-model="queryInfoChild.srm"
                        placeholder="请输入关键字" />
            </div>
          </BaseSearchBarItem>
        </el-col>

        <!-- 配对状态 -->
        <el-col :span="5">
          <BaseSearchBarItem>
            <div slot="lable">是否有自定义:</div>
            <div slot="input">
              <el-select v-model="queryInfoChild.i_define"
                         placeholder="全部">
                <el-option v-for="item in Custom"
                           :key="item.value"
                           :label="item.label"
                           :value="item.value" />
              </el-select>
            </div>
          </BaseSearchBarItem>
        </el-col>
        <!-- 按钮 -->
        <el-col :span="2"
                style="margin-left: 12px;">
          <el-button type="primary"
                     class="button1"
										 v-on:click="SearchEvent">搜索</el-button>
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>
<script>
import BaseSearchBarItem from "../../../components/BaseSearchBarItem";
export default {
  name: "BaseSearchBar",
  components: {
    BaseSearchBarItem
  },
  props: {
    isShow: {
      input: null,
      key: null
    }
  },
  data () {
    return {
      queryInfoChild: {
      	srm: "",
      	i_define: "",
      },
      Custom:[
      	{
      	  value: "",
      	  label: "全部"
      	},
      	{
      	  value: "dosageDefine",
      	  label: "剂量"
      	},
      	{
      	  value: "interDefine",
      	  label: "相互作用"
      	},
      	{
      	  value: "ivDefine",
      	  label: "体外配伍"
      	},
      	{
      	  value: "indicaDefine",
      	  label: "超适应症"
      	},
      	{
      	  value: "pediatricDefine",
      	  label: "儿童用药"
      	},
      	{
      	  value: "adultDefine",
      	  label: "成人用药"
      	},
      	{
      	  value: "geriatricDefine",
      	  label: "老人用药"
      	},
      	{
      	  value: "pregnancyDefine",
      	  label: "妊娠用药"
      	},
      	{
      	  value: "sexDefine",
      	  label: "性别用药"
      	},
      	{
      	  value: "routeDefine",
      	  label: "给药途径"
      	},
      	{
      	  value: "dupIngGenDefine",
      	  label: "重复用药"
      	},
      	{
      	  value: "contrScrDefine",
      	  label: "药物禁忌症"
      	},
      	{
      	  value: "reactionDefine",
      	  label: "不良反应"
      	},
      	{
      	  value: "compatibilityDefine",
      	  label: "配伍浓度"
      	},
      	{
      	  value: "anitDupIngGenDefine",
      	  label: "抗菌药物三联用药"
      	},
      	{
      	  value: "breastfeedingDefine",
      	  label: "哺乳用药"
      	},
      	{
      	  value: "preOperationDefine",
      	  label: "围术期用药"
      	},
      	{
      	  value: "liverDamageDefine",
      	  label: "肝损害剂量"
      	},
      	{
      	  value: "renalDamageDefine",
      	  label: "肾损害剂量"
      	}
      ],
    };
  },
	methods: {
	  SearchEvent: function () {
	    this.$emit("ChildSearchEvent", this.queryInfoChild)
	  }
	}
};
</script>
<style>
.search-title {
  color: #696969;
  border-right: 1px solid #c2c2c2;
  height: 50px;
  text-align: center;
  line-height: 50px;
}
.BaseSearchBar {
  font-size: 15px;
}
.el-select {
  display: inline-block;
}
.button1{
	margin-top:5px;
}
</style>
